<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMpsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mps', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->nullable()->comment('小程序名称');
            $table->string('ico')->nullable()->comment('图标');
            $table->string('unionid')->unique()->default('')->comment('唯一识别码');
            $table->string('appid')->nullable()->comment('appid');
            $table->string('AppSecret')->nullable()->comment('AppSecret');
            $table->json('caroot')->nullable()->comment('证书');
            $table->json('callback')->nullable()->comment('回调地址');
            $table->unsignedTinyInteger('status')->default('1')->comment('状态默认启用');
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mps');
    }
}
